package com.bianguo.android.functiondemo.view.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.zsd.android.recyclerviewlibrary.RViewHelper;
import com.zsd.android.recyclerviewlibrary.listener.RViewCreate;

public abstract class BaseRVActivity extends BaseActivity implements RViewCreate {

    protected RViewHelper rVHelper;

    @Override
    public void initView(@Nullable Bundle savedInstanceState) {
        rVHelper = new RViewHelper.Builder(this).build();
    }

    @Override
    public RecyclerView.LayoutManager createLayoutManager() {
        return new LinearLayoutManager(this);
    }

    @Override
    public RecyclerView.ItemDecoration createItemDecoration() {
        return new DividerItemDecoration(this, LinearLayoutManager.VERTICAL);
    }

    @Override
    public int startPageNumber() {
        return 0;
    }

    @Override
    public boolean isSupportPaging() {
        return false;
    }
}
